DEBUG_VARS	+= GDBSTUB_DIR
GDBSTUB_DIR := $(COMPONENT_PATH)

CACHE_VARS			+= COM_PORT_GDB
DEBUG_VARS			+= COM_SPEED_GDB
COM_PORT_GDB		?= $(COM_PORT)
COM_SPEED_GDB		?= $(COM_SPEED_SERIAL)

# Full GDB command line
DEBUG_VARS	+= GDBSTUB_DIR
GDBSTUB_DIR := $(COMPONENT_PATH)

CACHE_VARS += GDB_CMDLINE
GDB_CMDLINE = trap '' INT; $(GDB) -x $(GDBSTUB_DIR)/gdbcmds -b $(COM_SPEED_GDB) -ex "target remote $(COM_PORT_GDB)" $(TARGET_OUT)
